<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<div class="container-fluid">
<div class="row-fluid">
<div class="span2"></div>
<div class="span8">
<div class="row-fluid">
<!-- left side search box container-->
<div class="span12" >
<h3>Edit Trek</h3>
<!-- form for Trekking event -->
<div id="trekkingform" class="well">
<s:form theme = "simple" cssClass="form-horizontal" action="updatetrek" method="post" enctype="multipart/form-data">
<div class="control-group">
  		<div class="controls">
  		<s:if test="hasFieldErrors()">
   			 <div class="alert alert-error span8">  
  		 		<s:fielderror></s:fielderror>	
  		  </div> 
  		 </s:if>
  		 </div>
  		 </div>
  		 <s:iterator value="trekpojo">
  		 <s:hidden name="trekkingid" value="%{trekkingid}"></s:hidden>
<div class="control-group">
<label class="control-label" for="fortrektitle">Your Trek Title*</label>
<div class="controls">
<s:textfield id="fortrektitle" maxlength="256" name="trektitle" cssClass="input-xxlarge" placeholder="" value="%{trektitle}"></s:textfield>
</div>
</div>  		
<div class="control-group">
<label class="control-label" for="fortreklocationname">Location*</label>
<div class="controls">
<s:select id="fortreklocationname" maxlength="100" name="location"  cssClass="" list="locations" value="%{location}"></s:select>
</div>
</div> 
<div class="control-group">
<label class="control-label" for="fortreklocationdetails">Location Details</label>
<div class="controls">
<s:textarea id="fortreklocationdetails" name="locationdetail" cssClass="input-xxlarge" placeholder="" value="%{locationdetail}"></s:textarea>
</div>
</div> 
<div class="control-group">
<label class="control-label" for="dp1">Start Date*</label>
<div class="controls">
<s:textfield style="background-color:white;" id="dp1" name="date" readonly="true" cssClass="input-small" placeholder="" value="%{date}"></s:textfield>
</div>
</div> 
<div class="control-group">
<label class="control-label" for="fortrekduration">Duration*</label>
<div class="controls">
<s:textfield id="fortrekduration" maxlength="3" name="duration" cssClass="input-mini" placeholder="" value="%{duration}"></s:textfield> Days
</div>
</div> 
<div class="control-group">
<label class="control-label" for="fortrekallowedpeople">Gender*</label>
<div class="controls">
<s:select id="fortrekallowedpeople" name="gender"  cssClass="" list="{'Both Men & Women', 'Men', 'Women'}" value="%{gender}"></s:select>
</div>
</div> 
<div class="control-group">
<label class="control-label" for="fortrekdistance">Distance*</label>
<div class="controls">
<s:textfield id="fortrekdistance" maxlength="5" name="distance" cssClass="input-mini" placeholder="" value="%{distance}"></s:textfield> Kms
</div>
</div>
<div class="control-group">
<label class="control-label" for="fortrekdifficultylevel">Difficulty Level*</label>
<div class="controls">
<s:select id="fortrekdifficultylevel" name="difficultylevel"  cssClass="" list="{'Easy', 'Moderate', 'Hard'}" value="%{difficultylevel}"></s:select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="fortrekgearsrequired">Gears Required</label>
<div class="controls">
<s:select id="fortrekgearsrequired" multiple="true" name="gears"  cssClass="" list="{'Backpack', 'Trekking Shoes', 'Sleeping Bag','Sleeping Mat', 'Raincoat/Poncho', 'Tent/Tarp', 'GPS', 'Wind Cheater/Body Warmer', 'Nylon Rope', 'Torch', 'knief'}" value="%{gears}">
</s:select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="fortrekorganizationname">Organization Name*</label>
<div class="controls">
<s:textfield id="fortrekorganizationname" maxlength="100" name="organizationname" cssClass="input-xxlarge" placeholder="" value="%{organizationname}"></s:textfield>
</div>
</div> 
<div class="control-group">
<label class="control-label" for="fortrekorganizationdetails">Organization Mobile No.*</label>
<div class="controls">
<s:textfield id="fortrekorganizationphone" maxlength="15" name="organizationphone" cssClass="input-large" placeholder="" value="%{organizationphone}"></s:textfield>
</div>
</div> 
<div class="control-group">
<label class="control-label" for="fortrekplan">Trek Plan</label>
<div class="controls">
<s:textarea id="fortrekplan" name="trekplan" cssClass="input-large" placeholder="" value="%{trekplan}"></s:textarea>
</div>
</div>
<script>
                CKEDITOR.replace( 'trekplan' );
</script> 
</s:iterator>

<div class="control-group">
<label class="control-label" for="forpicupload">Upload Pics</label>
<div class="controls">
<s:file id="forpicupload" label="File 1" name="fileUpload" cssClass="input-large"/>
<s:file id="forpicupload" label="File 2" name="fileUpload" cssClass="input-large"/>
<s:file id="forpicupload" label="File 3" name="fileUpload" cssClass="input-large"/>
<s:file id="forpicupload" label="File 4" name="fileUpload" cssClass="input-large"/>
</div>
</div> 
<hr />
<h4>Create Tickets</h4>
<br />
<s:iterator value="ticketpojo">
<s:hidden name="ticketid" value="%{ticketid}"></s:hidden>
<div class="control-group">
<label class="control-label" for="fortickettype">Ticket Type*</label>
<div class="controls">
<s:select id="fortickettype" name="tkttype"  cssClass="" list="{'Paid', 'Free', 'Social Cause'}" value="%{tickettype}"></s:select>
</div>
</div> 
<div id="tktpricing">
<div class="control-group">
<label class="control-label" for="forticketquantity">Quantity*</label>
<div class="controls">
<s:textfield id="forticketquantity" maxlength="4" name="tktquantity" cssClass="input-mini" placeholder="" value="%{quantity}"></s:textfield>
</div>
</div>
<div id="tktpaid">
<div class="control-group">
<label class="control-label" for="forticketamount">Amount (in Rs.)*</label>
<div class="controls">
<s:textfield id="forticketamount" maxlength="6" name="tktamount" cssClass="input-small" placeholder="" value="%{amount}"></s:textfield> 
</div>
</div>
</div>
<div class="control-group">
<label class="control-label" for="dp2">End Date*</label>
<div class="controls">
<s:textfield style="background-color:white;" id="dp2" name="tktenddate" readonly="true" cssClass="input-small" placeholder="" value="%{enddate}"></s:textfield>
</div>
</div>  
<div class="control-group">
<label class="control-label" for="forticketdesc">Description</label>
<div class="controls">
<s:textarea id="forticketdesc" name="tktdescription" cssClass="input-xxlarge" placeholder="" value="%{description}"></s:textarea>
</div>
</div>
									<script>
										CKEDITOR.replace('tktdescription');
									</script>
									<!--  <div class="control-group">
<label class="control-label" for="forticketallowedperorder">Ticket Allowed Per Order</label>
<div class="controls">
<s:textfield id="forticketallowedperorder" maxlength="4" name="tktallowedperorder" cssClass="input-mini" placeholder=""></s:textfield>
</div>-->
</div>
</s:iterator>
<div class="control-group">
<div class="controls">
<s:submit name="update" theme = "simple" cssClass="btn btn-medium btn-danger" value="Update Trek"></s:submit> 
</div>
</div>
</s:form>
</div>
<!-- form for Trekking event ends here-->
</div>
</div>
</div>
<div class="span2"></div>
</div></div>
